package main

import (
	"fmt"
	"strings"
	//"reflect"
)

func main() {
	var str string = "1-3324-2-5345-3-3555--"
	fmt.Println(strings.TrimRight(str, "-"))

	type BBB struct {
		id uint32
	}

	type AAA struct {
		hello map[uint32]*BBB
	}

	/*a := new(AAA)
	fmt.Printf("len(a.hello):%d", len(a.hello))
	if v, exist := a.hello[0]; exist {
		fmt.Println("a.hello[0]:%v", v)
	}*/

	/*var sl []*BBB
	for i := 0; i < 10; i++ {
		if i >= 5 {
			sl = append(sl, &BBB{
				id: uint32(5),
			})
		} else {
			sl = append(sl, &BBB{
				id: uint32(i),
			})
		}
	}

	for index, v := range sl {
		//for index := 0; index < len(sl); index++ {
		if sl[index].id == 5 {
			sl = append(sl[:index], sl[index+1:]...)
			continue
		}
		//fmt.Printf("i:%d v:%d\n", index, *sl[index])
		fmt.Printf("i:%d v:%d\n", index, v.id)
	}
	fmt.Println("---------------------")
	for i, v := range sl {
		fmt.Printf("i:%d v:%d\n", i, v.id)
	}*/

	/*var mp map[uint32][]*BBB = make(map[uint32][]*BBB)
	//var mp map[uint32][]*BBB
	for i := 0; i < 10; i++ {
		mp[uint32(i)] = []*BBB{{
			id: 555,
		}}
	}
	/*mp[11] = make([]*BBB, 0)
	mp[11] = append(mp[11], &BBB{
		id: 555,
	})*/

	//fmt.Printf("mp:%v", mp)

	//var mp map[uint32]uint32 = make(map[uint32]uint32)
	var mp map[uint32]uint32

	/*mp[1] = 5
	mp[2] = 5
	mp[3] = 5*/
	type AA struct {
		mp map[uint32]uint32
	}

	a := new(AA)

	if len(a.mp) == 0 {
		fmt.Printf("a.mp:%v", a.mp)
	}
	if v, e := mp[3]; e {
		fmt.Printf("mp[3]:%d", v)
	}

	fmt.Printf("len(get()):%d", len(get()))
}

func get() map[uint32]uint32 {
	return nil
}
